package com.example.demo.java8.functionalinterface;

/**
 * 函数型接口练习
 *
 * @author luowj12
 * @since 2021/5/8 17:17
 */
public class TestMain {

    public static void main(String[] args) {

        String message = "message";

        TestInterface testInterface = str -> System.out.println(str);

        testInterface.say(message);

        //Runnable也是函数型接口
        Runnable r1 = () -> System.out.println("hello lambda");
    }

}
